// RemEdit.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "RemEdit.h"
//#include "RemEditDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CRemEditApp

BEGIN_MESSAGE_MAP(CRemEditApp, CWinApp)
	//{{AFX_MSG_MAP(CRemEditApp)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG
	ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRemEditApp construction

CRemEditApp::CRemEditApp()
{
	// TODO: add construction code here,
	// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CRemEditApp object

CRemEditApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CRemEditApp initialization

BOOL CRemEditApp::InitInstance()
{
	AfxEnableControlContainer();

	// Standard initialization
	// If you are not using these features and wish to reduce the size
	//  of your final executable, you should remove from the following
	//  the specific initialization routines you do not need.

#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif


//	CString FileName="D:\\c++\\- MY\\Wp3\\WPReminder\\Debug\\WPReminder.dll";
	CString FileName="WPReminder.dll";
	HINSTANCE hDLL=AfxLoadLibrary(FileName);
	if (hDLL==NULL)	
	{	AfxMessageBox("Can't find library\n\n"+FileName);
		return FALSE;
	}
	DLL_RemEdit p_Proc=(DLL_RemEdit)GetProcAddress(hDLL,"?RemEdit@@YGXVCString@@@Z"); 
	if (p_Proc!=NULL)	
	{	
//		p_Proc("D:\\c++\\- MY\\Wp3\\INSTALL\\Reminder.ini");
		p_Proc("Reminder.ini");
	} else
	{	AfxMessageBox("Can't find function");
	}
	AfxFreeLibrary(hDLL);
	return FALSE;
}
